FROM python:3.8.13-bullseye
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list
COPY ./dy_lib/TDengine-client-2.2.1.1-Linux-x64.tar.gz /
RUN tar -xzvf TDengine-client-2.2.1.1-Linux-x64.tar.gz
RUN cd /TDengine-client-2.2.1.1 && ./install_client.sh

RUN apt-get update
RUN apt-get install bash
RUN apt-get install bash-doc
RUN apt-get install bash-completion
RUN apt-get install git
#RUN apt-get install mysql-client
#RUN apt-get install mariadb-dev
#RUN apt-get install build-base
#RUN apt-get install openssl-dev
#RUN apt-get install zlib-dev
#RUN apt-get install bzip2-dev
#RUN apt-get install pcre-dev
RUN apt-get install ncurses-dev
#RUN apt-get install readline-dev
RUN apt-get install tk-dev
#RUN apt-get install postgresql-dev
RUN apt-get install libffi-dev
WORKDIR /backend
COPY ./backend/ .
COPY ./backend/requirements.txt /
RUN python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ -r requirements.txt
RUN python3 -m pip install daphne -i https://pypi.tuna.tsinghua.edu.cn/simple/
CMD ["daphne","-b","0.0.0.0","-p","8000","application.asgi:application"]
